﻿namespace WebAPI.Utils
{
    public sealed class ResponseInfo<T> where T : class
    {
        /*
         Microsoft.AspNetCore.Http.StatusCodes
         System.Net.HttpStatusCode
         */

        /// <summary>
        /// 响应代码（自定义）
        /// </summary>
        public int Code { get; set; }

        /// <summary>
        /// 接口状态
        /// </summary>
        public bool Success { get; set; }
        
        /// <summary>
        /// 提示信息
        /// </summary>
        public string Message { get; set; } = string.Empty;

        /// <summary>
        /// 数据体
        /// </summary>
        public T? Data { get; set; }
    }
}